From f7466b236a92dd7eb536f80a08e833971cb4566f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 7 Dec 2015 22:11:52 -0500 Subject: [PATCH] stackswitcher: Stop hardcoding 100px width We can now set a min-width in the theme, so we don't have to hardcode the size request here anymore. https://bugzilla.gnome.org/show_bug.cgi?id=726371 --- gtk/gtkstackswitcher.c | 5 ----- gtk/theme/Adwaita/_common.scss | 5 +++++ gtk/theme/Adwaita/gtk-contained-dark.css | 8 ++++++++ gtk/theme/Adwaita/gtk-contained.css | 8 ++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c index e8f3b9b004..3d1a5ece46 100644 --- a/gtk/gtkstackswitcher.c +++ b/gtk/gtkstackswitcher.c @@ -187,11 +187,6 @@ update_button (GtkStackSwitcher *self, gtk_widget_set_visible (button, gtk_widget_get_visible (widget) && (title != NULL || icon_name != NULL)); - if (icon_name != NULL) - gtk_widget_set_size_request (button, -1, -1); - else - gtk_widget_set_size_request (button, 100, -1); - g_free (title); g_free (icon_name); diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index df9207fe54..75dbe2532b 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -2681,6 +2681,7 @@ row { *************/ expander { + & title:hover { background: red; } & arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } @@ -3376,3 +3377,7 @@ frame.keycap { *:dnd { border: 1px solid black; } + +stackswitcher button.text-button { + min-width: 100px; +} diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index dceb9f6918..5d561b0f6c 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -3804,6 +3804,8 @@ row { /************* * Expanders * *************/ +expander title:hover { + background: red; } expander arrow { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } expander arrow:dir(rtl) { @@ -4551,6 +4553,12 @@ frame.keycap { *:dnd { border: 1px solid black; } +stackswitcher button.text-button, stackswitcher GtkScaleButton.button.text-button, +stackswitcher GtkVolumeButton.button.text-button, +stackswitcher .titlebar button.text-button.titlebutton, +.titlebar stackswitcher button.text-button.titlebutton { + min-width: 100px; } + /* GTK NAMED COLORS ---------------- use responsibly! */ diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index aac8f20d63..eb616e1222 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -3974,6 +3974,8 @@ row { /************* * Expanders * *************/ +expander title:hover { + background: red; } expander arrow { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } expander arrow:dir(rtl) { @@ -4724,6 +4726,12 @@ frame.keycap { *:dnd { border: 1px solid black; } +stackswitcher button.text-button, stackswitcher GtkScaleButton.button.text-button, +stackswitcher GtkVolumeButton.button.text-button, +stackswitcher .titlebar button.text-button.titlebutton, +.titlebar stackswitcher button.text-button.titlebutton { + min-width: 100px; } + /* GTK NAMED COLORS ---------------- use responsibly! */ -- 2.30.2